fix(cloud): authenticate task requests before payload validation - #1361
Merged
groupthinking merged 2 commits intoAug 29, 2026
Merged
Conversation
Port the canonical two-file artifact from PR #1132 (exact head 42939e0) onto current main: /api/v3/process-video-task now checks the X-CloudTasks-TaskName gate before parsing the body, so unauthorized malformed calls return 403 while authorized malformed calls keep strict 422 validation (including invalid UTF-8 bodies via errors(include_input=False)). The request-body schema stays documented in OpenAPI via openapi_extra. Generated with [Linear](https://linear.app/myxstack/issue/GRV-198/execution-enforce-cloud-tasks-authentication-before-payload-validation#agent-session-95a9c398) Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
Contributor
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
Agent Completion Truth Gate: BLOCKEDReasons: Machine-readable verdict{
"details": {
"collection_errors": [
"missing_intent_snapshot",
"agent_run_id_mismatch",
"agent_login_mismatch"
],
"identity_projection": {
"agent_login": "groupthinking",
"issue_number": 1134,
"run_id": "eventrelay-daily-control-20260731-1317z"
}
},
"reasons": [
"evidence_collection_failed",
"missing_agent_result",
"missing_copilot_current_head_review",
"missing_copilot_rabbit_label",
"draft_pr"
],
"verdict": "blocked"
} |
This was referenced Aug 5, 2026
Merged
groupthinking
marked this pull request as ready for review
August 29, 2026 07:09
…-before-grv-198-fba7
groupthinking
deleted the
execution-enforce-cloud-tasks-authentication-before-grv-198-fba7
branch
August 29, 2026 07:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Canonical issue
Closes #1134
Outcome
/api/v3/process-video-tasknow checks the Cloud TasksX-CloudTasks-TaskNamegate before parsing the request body. Unauthorized malformed calls return403; authorized malformed calls (including invalid UTF-8 bodies) keep strict422validation; authorized valid calls behave exactly as before.Scope
src/youtube_extension/backend/cloud_api_endpoints.py,tests/unit/test_cloud_routes.py— an exact port of the canonical two-file artifact from fix(cloud): authenticate task requests before payload validation (#1134) #1132 (head42939e0012ed2d3bab18de445655c98da0ad6980) onto currentmain, since that branch is now in a conflicting (dirty) merge state.Risk
openapi_extraand covered by a test.Verification
pytest tests/unit/test_cloud_routes.py -k process_video_task --no-cov— 7 passed (403-before-422 ordering, malformed authorized 422, invalid UTF-8 422, OpenAPI schema)tests/unit/test_cloud_routes.py— 93 passedruff checkon both files — only pre-existing B904 findings in untouched codeProduction evidence
No production mutation is authorized by the linked issue; not applicable.
Agent handoff
main; one of the two should be closed once this head verifiesAgent provenance